package com.spring.common.controller;

import com.spring.common.service.PersonService;
import com.spring.common.service.impl.PersonServiceImpl;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class PersonController {

  @Test
  public void testCommonSpring() {
    ApplicationContext ac = new ClassPathXmlApplicationContext("spring-common.xml");
    PersonService personService = ac.getBean(PersonServiceImpl.class);
    personService.savePerson();
  }

}
